package com.keien.kleidianplan;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;

public class Score{
	private Rect dst;
	private Paint aPaint;
	private int totalScore = 0;
	
	
	public Score(){
		dst = new Rect();
		aPaint = new Paint();
	}
	
	public void draw(Canvas lockCanvas){
		aPaint.setStyle(Style.STROKE);
		aPaint.setColor(Color.GRAY);
		dst.set(10, 10, 120, 40);
		lockCanvas.drawRect(dst, aPaint);
		aPaint.setColor(Color.BLACK);
		aPaint.setTextSize(24);
		lockCanvas.drawText(totalScore+"", 30, 35, aPaint);
	}
	
	public int addScore(int number){
		totalScore = totalScore + number;
		return totalScore;
	}
	
	public void initScore() {
		setTotalScore(0);
	}

	public int getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(int totalScore) {
		this.totalScore = totalScore;
	}
	
	
}
